package com.jiuwei.threadtest1.controller;

import com.jiuwei.threadtest1.service.serviceImpl.OrderRedisServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/order")
@Slf4j
public class OrderRedisController {
    @Autowired
    private OrderRedisServiceImpl orderRedisService;
    /**
     * 实现分布式锁
     */
    @GetMapping("/redis")
    public void useRedis() {
        log.info("实现分布式锁");
        orderRedisService.useRedis();
    }
}
